/**************************************************************************/
/*                                                                        */
/* Copyright (c) 2017 KYE Company                                       */
/* 跨越速运集团有限公司版权所有                                           */
/*                                                                        */
/* PROPRIETARY RIGHTS of KYE Company are involved in the                */
/* subject matter of this material. All manufacturing, reproduction, use, */
/* and sales rights pertaining to this subject matter are governed by the */
/* license agreement. The recipient of this software implicitly accepts   */
/* the terms of the license.                                              */
/* 本软件文档资料是跨越速运集团有限公司的资产，任何人士阅读和                   */
/* 使用本资料必须获得相应的书面授权，承担保密责任和接受相应的法律约束。                 */
/*                                                                        */
/**************************************************************************/

/**
  * <pre>
  * 作   者：liwei
  * 创建日期：2018-1-4
  * </pre>
  */

package com.kyexpress.common.hrinterview.provider.service;

import java.util.List;
import java.util.Map;

import com.kyexpress.common.hrinterview.api.bo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.kyexpress.framework.service.GenericService;
import com.kyexpress.common.hrinterview.api.model.Employee;
import com.kyexpress.common.hrinterview.provider.mapper.EmployeeMapper;

/**
 * <pre>
 * 面试人员表业务类
 * </pre>
 */
@Service("employeeService")
public class EmployeeService extends GenericService<Employee, Long> {

    @Autowired
    private EmployeeStudyExpService employeeStudyExpService;

    @Autowired
    private EmployeeWorkExpService employeeWorkExpService;

    @Autowired
    private EmployeeUploadService employeeUploadService;

    public EmployeeService(@Autowired EmployeeMapper employeeMapper) {
        super(employeeMapper);
    }
    
    public EmployeeMapper getMapper() {
        return (EmployeeMapper) super.genericMapper;
    }

    public void update(Employee data, EmployeeStudyExpBO studyExpBO, EmployeeWorkExpBO workExpBO, EmployeeUploadBO uploadBO) {
        this.updateSelective(data);
        employeeStudyExpService.batchOperation(studyExpBO);
        employeeWorkExpService.batchOperation(workExpBO);
        employeeUploadService.batchOperation(uploadBO);
    }

    public List<DepartmentCount> statistics() {
        return this.getMapper().statistics();
    }

    public List<Employee> statisticsInterviewList() {
        return this.getMapper().statisticsInterviewList();
    }

}